/*
  *api
 */
import request from '@/utils/request'
// 首页banner，数据
export function indexData(data?:any) {
    return request({
        url: '/api/pc/indexData',
        method: 'get',
        data
    })
}
// 首页列表
export function requirementList(data?:any) {
    return request({
        url: '/api/requirement/list',
        method: 'post',
        data
    })
}
// 获取合作领域数据
export function listDomainAll(data?:any) {
    return request({
        url: '/api/requirement/listDomainAll',
        method: 'get',
        data
    })
}
// 需求区域列表
export function listAreaAll(data?:any) {
    return request({
        url: '/api/requirement/listAreaAll',
        method: 'get',
        data
    })
}
// 需求详情
export function detailApi(params?:any) {
    return request({
        url: '/api/requirement/detail',
        method: 'get',
        params
    })
}
// 发送验证码
export function sendSms(data?:any) {
    return request({
        url: '/api/index/sendSms',
        method: 'post',
        data
    })
}
// 注册
export function register(data?:any) {
    return request({
        url: '/api/login/register',
        method: 'post',
        data
    })
}
// 忘记密码
export function forgotPassword(data?:any) {
    return request({
        url: '/api/user/forgotPassword',
        method: 'post',
        data
    })
}
// 账号登录
export function accountLogin(data?:any) {
    return request({
        url: '/api/login/accountLogin',
        method: 'post',
        data
    })
}
// 手机登录
export function mobileLogin(data?:any) {
    return request({
        url: '/api/login/mobileLogin',
        method: 'post',
        data
    })
}
// 对接需求
export function requirementDocking(data?:any) {
    return request({
        url: '/api/requirement/requirementDocking',
        method: 'post',
        data
    })
}
// 获取权限数量
export function requirementLimit(params?:any) {
    return request({
        url: '/api/requirement/requirementLimit',
        method: 'get',
        params
    })
}
// 个人信息 - V1
export function userInfoApi(params?:any) {
    return request({
        url: '/api/user/info',
        method: 'get',
        params
    })
}
// 修改个人名片
export function userInfoEdit(data?:any) {
    return request({
        url: '/api/user/editInfo',
        method: 'post',
        data
    })
}
// 创建需求
export function createRequirement(data?:any) {
    return request({
        url: '/api/requirement/createRequirement',
        method: 'post',
        data
    })
}
// 修改需求
export function updateRequirement(data?:any) {
    return request({
        url: '/api/requirement/updateRequirement',
        method: 'post',
        data
    })
}
// 我的-我发布的
export function myRequirementList(data?:any) {
    return request({
        url: '/api/requirement/requirementList',
        method: 'post',
        data
    })
}
// 我的-上线-下线
export function updateRequirementStatus(data?:any) {
    return request({
        url: '/api/requirement/updateRequirementStatus',
        method: 'post',
        data
    })
}
// 我的-刷新需求
export function refreshRequirement(data?:any) {
    return request({
        url: '/api/requirement/refreshRequirement',
        method: 'post',
        data
    })
}
// 我的-合作历史
export function requirementLog(params?:any) {
    return request({
        url: '/api/requirement/requirementLog',
        method: 'get',
        params
    })
}
// 退出登陆
export function logout(data?:any) {
    return request({
        url: '/api/user/logout',
        method: 'post',
        data
    })
}
// 修改密码
export function changePwd(data?:any) {
    return request({
        url: '/api/user/changePwd',
        method: 'post',
        data
    })
}
// 举报
export function requirementReport(data?:any) {
    return request({
        url: '/api/requirement/requirementReport',
        method: 'post',
        data
    })
}
// 隐私协议
export function policy(params?:any) {
    return request({
        url: '/api/index/policy',
        method: 'get',
        params
    })
}
// 文章详情
export function article(params?:any) {
    return request({
        url: '/api/article/detail',
        method: 'get',
        params
    })
}
// 公共配置
export function getConfig(params?:any) {
    return request({
        url: '/api/pc/getConfig',
        method: 'get',
        params
    })
}
// 上传图片
export function uploadImage(data?:any) {
    return request({
        url: '/api/upload/image',
        method: 'post',
        data
    })
}
// 绑定手机号
export function bindMobile(data?:any) {
    return request({
        url: '/api/user/bindMobile',
        method: 'post',
        data
    })
}
// 修改企业名片 - V1
export function editCompanyInfo(data?:any) {
    return request({
        url: '/api/user/editCompanyInfo',
        method: 'post',
        data
    })
}
// 扫码获取参数
export function scanCodeParam(params?:any) {
    return request({
        url: '/api/login/scanCodeParam',
        method: 'get',
        params
    })
}
// 微信登陆
export function scanLogin(data?:any) {
    return request({
        url: '/api/login/scanLogin',
        method: 'post',
        data
    })
}
export function bindOpen(data?:any) {
    return request({
        url: '/api/user/bindOpen',
        method: 'post',
        data
    })
}

// 微信登陆
export function unbindWechat() {
    return request({
        url: '/api/user/unbindOpen',
        method: 'post'
    })
}
